<div class="box-body">
    <form class="layui-form" action="{:url('/wms/pmabox/save')}" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label xrequired">账号</label>
            <div class="layui-input-block">
                <select name="account_id" lay-search>
                    <option value="">请选择</option>
                    {foreach $accounts as $account}
                    <option {if isset($boxcode) && $boxcode.account_id == $account.account_id}selected{/if} value="{$account.account_id}">{$account.username}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label xrequired">平台PDF</label>
            <div class="layui-input-block">
                <button id="upload-btn" type="button" class="layui-btn layui-btn-sm"><i class="layui-icon layui-icon-upload"></i>上传</button>
                <input type="hidden" id="boxcode-path" name="path_pdf" {if isset($boxcode)}value="{$boxcode.path_pdf}"{/if}>
                <input type="hidden" id="boxcode-name" name="name_pdf" {if isset($boxcode)}value="{$boxcode.name_pdf}"{/if}>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label xrequired">总箱数</label>
            <div class="layui-input-block">
                <input type="number" autocomplete="off" placeholder="发货总箱数"  name="total_box" {if isset($boxcode)}value="{$boxcode.total_box}"{else}value="1"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="备注"  name="remark" {if isset($boxcode)}value="{$boxcode.remark}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="checkbox" name="status" value="1" {if !isset($boxcode) || (isset($boxcode) && $boxcode.status=='1')}checked{/if} lay-skin="switch">
            </div>
        </div>
        {if isset($boxcode)}
        <input type="hidden" name="box_id" value="{$boxcode.box_id}">
        {/if}
    </form>
</div>